<?php
include "connection.php";
$kotakabupaten=$_GET['kotakabupaten'];


$result=mysql_query("SELECT distinct(KECAMATAN) FROM pk14_pinter_location where KABUPATEN='" . $kotakabupaten . "'");

while ($row = mysql_fetch_object($result)) 
		{
			
			$arr[]=array("name"=>$row->KECAMATAN);
		}
		$response=array("items"=>$arr);
		$final=array("response"=>$response);
		echo json_encode($final);
?>